package caiziyou.com.designpattern.principle.segregation;
/**
 * 代码冗余
 * @author Administrator
 *
 */
public class SegregationDemo {

	public static void main(String[] args) {

	}
}

interface Interface1 {
	public void operater1();

	public void operater2();

	public void operater3();

	public void operater4();

	public void operater5();
}

class B implements Interface1 {

	@Override
	public void operater1() {
		System.out.println("B operater1 ");
	}

	@Override
	public void operater2() {
		System.out.println("B operater2 ");
	}

	@Override
	public void operater3() {
		System.out.println("B operater3 ");
	}

	@Override
	public void operater4() {
		System.out.println("B operater4 ");
	}

	@Override
	public void operater5() {
		System.out.println("B operater5 ");
	}

}

class D implements Interface1 {

	@Override
	public void operater1() {
		System.out.println("D operater1 ");
	}

	@Override
	public void operater2() {
		System.out.println("D operater2 ");
	}

	@Override
	public void operater3() {
		System.out.println("D operater3 ");
	}

	@Override
	public void operater4() {
		System.out.println("D operater4 ");
	}

	@Override
	public void operater5() {
		System.out.println("D operater5 ");
	}

}

class A {
	public void operater1(Interface1 i) {
		i.operater1();
	}

	public void operater2(Interface1 i) {
		i.operater2();
	}

	public void operater3(Interface1 i) {
		i.operater3();
	}
}

class C {
	public void operater4(Interface1 i) {
		i.operater4();
	}

	public void operater5(Interface1 i) {
		i.operater5();
	}
	
}
